package com.sc.nft.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PayMethodEnum {
  AL_PAY(1, "","", PayChannelEnum.NATIVE, "支付宝支付","https://cdn.gometa.com.cn/scnft%2Fdefault%2FAL_PAY.png"), // 支付宝原生支付
  SAND_FAST_PAY(2, "06030003","00000018", PayChannelEnum.SAND, "银联支付","https://cdn.gometa.com.cn/scnft%2Fdefault%2FSAND_FAST_PAY.png"), // 衫德快捷充值
  SAND_CLOUD_PAY(3, "02030001", "00002046",PayChannelEnum.SAND, "云闪付","https://cdn.gometa.com.cn/scnft%2Fdefault%2FSAND_CLOUD_PAY.png"), // 衫德云闪付
  AL_PAY_WEB(4, "","", PayChannelEnum.NATIVE, "支付宝H5支付","https://cdn.gometa.com.cn/scnft%2Fdefault%2FAL_PAY.png"), // 支付宝H5支付
  FAST_PAY(5, "", "",PayChannelEnum.SAND, "衫德支付","https://cdn.gometa.com.cn/scnft/h5_default/C96C036E76F6E690"), // 杉德绑卡
  WALLET_PAY(6, "","", PayChannelEnum.NATIVE, "余额支付","https://cdn.gometa.com.cn/scnft/default/wallet_icon.png"), // 系统钱包
  HF_FAST_PAY(7, "", "",PayChannelEnum.HF_PAY, "汇付收银台支付","https://cdn.gometa.com.cn/scnft/h5_default/85A7167AA552A72A"),
  SAND_BALANCE_PAY(8, "","", PayChannelEnum.SAND, "衫德余额支付","https://cdn.gometa.com.cn/scnft/default/sandWallet.png"),
  APPLE_PAY(9, "", "",PayChannelEnum.APPLE_PAY, "苹果支付",""),
  LL_PAY(10, "", "",PayChannelEnum.LL_PAY, "连连支付","https://cdn.gometa.com.cn/scnft/h5_default/66D7C5F16798BBC5"),
  HNA_PAY(11, "","", PayChannelEnum.HNA_PAY, "新生支付","https://cdn.gometa.com.cn/scnft/h5_default/AA98DB00BE0A2A56"),
  WX_PAY(12, "", "",PayChannelEnum.HNA_PAY, "微信支付",""),
  BALANCE_ONLY(13, "", "",PayChannelEnum.NATIVE, "仅余额支付","https://cdn.gometa.com.cn/scnft/default/wallet_icon.png"),// 原石是不可用的
  LL_BALANCE_PAY(14,"","",PayChannelEnum.LL_PAY,"连连余额支付","https://cdn.gometa.com.cn/LL_3X.png"),
  ;
  @EnumValue private int code;
  private String productCode;
  private String newProductCode;
  private PayChannelEnum channel;
  private String description;
  private String icon;

  public static String getValue(int code) {
    PayMethodEnum[] values = values();
    for (PayMethodEnum v : values) {
      if (v.getCode() == (code)) {
        return v.getDescription();
      }
    }
    return null;
  }

  public static void main(String[] args) {
    System.out.println(getValue(1));
    System.out.println(getValue(2));
    System.out.println(getValue(3));
    System.out.println(getValue(4));
  }
}
